package com.example.demo.jpa.org.service;

import com.example.demo.jpa.customer.dto.CustomerDTO;
import com.example.demo.jpa.org.dao.OrgDao;
import com.example.demo.jpa.org.domain.Org;
import com.example.demo.jpa.org.dto.OrgCommand;
import com.example.demo.jpa.org.dto.OrgDto;
import jakarta.servlet.http.PushBuilder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class OrgService {
    @Autowired
    OrgDao orgDao;

    public OrgDto findOrgByID(long id) {
        return orgDao.findOrgByID(id);
    }

    public OrgDto createOrg(OrgCommand orgCommand) {
        return orgDao.createOrg(orgCommand);
    }

    public OrgDto updateOrg(long id, OrgCommand orgCommand) {
        return orgDao.updateOrg(id, orgCommand);
    }

    public void deleteById(long id) {
        orgDao.deleteById(id);
    }
}
